/*
 * Autor:FengXiang Wang(王枫翔)
 * version 2017年7月28日 下午3:45:15 
 * ajax请求
 */
RestFul = {
    BASE_PATH : '',
    POST_AJAX :function(path, data, success, error) {
        $.ajax({
            type : 'POST',
            url : RestFul.BASE_PATH + path,
            headers : {
                "Content-Type": "application/x-www-form-urlencoded"
            },
            data : data,
            dataType : 'json',
            async: true,
            cache: false,
            success : success,
            error : function(e) {
            	console.log(RestFul.BASE_PATH + path+"请求信息失败！");
            }
        });
    },
    BASE_POST_AJAX :function(path, data, success, error) {
        $.ajax({
            type : 'POST',
            url : RestFul.BASE_PATH + path,
            data : data,
            dataType : 'json',
            async: true,
            cache: false,
            success : success,
            error : function(e) {
            	console.log(RestFul.BASE_PATH + path+"请求信息失败！");
            }
        });
    },
    GET_AJAX :function(path, data, success, error) {
        $.ajax({
            type : 'GET',
            url : RestFul.BASE_PATH + path,
            data : data,
            dataType : 'json',
            async: false,
            cache: false,
            success : success,
            error : function(e) {
            	console.log(RestFul.BASE_PATH + path+"请求信息失败！");
            }
        });
    }
};